package com.huaxin.hxenum.validation;

import com.huaxin.hxenum.validator.DataTypeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = DataTypeValidator.class)
public @interface ValidDataType {
    String message() default "无效的数据类型，允许值：number, string";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
